import axios from 'axios'

const api = axios.create({
  baseURL: 'https://restapi.amap.com/v3',
  timeout: 10000,
})

// 请求拦截器
api.interceptors.request.use((config) => {

  return config
})

// 响应拦截器
api.interceptors.response.use(
  (response) => response.data, 
  (error) => {
    return Promise.reject(error)
  }
)

export default api
